﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Calculate
    {

        //protected int a= int.Parse(Console.ReadLine());
        //protected int b= int.Parse(Console.ReadLine());
        protected int a { get; set; }
        protected int b { get; set; }
        public Calculate(int a, int b)
        {
            this.a = a;
            this.b = b;
        }

        public virtual void DisplayResult()
        {

            Console.WriteLine();
        }

    }
    class ADD : Calculate
    {
        public ADD(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a + b);
        }

    }
    class Reduce : Calculate
    {
        public Reduce(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a - b);
        }

    }
    class Take : Calculate
    {
        public Take(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a * b);
        }

    }
    class Didive : Calculate
    {
        public Didive(int a, int b) : base(a, b)
        {

        }
        public override void DisplayResult()
        {
            Console.WriteLine(a / b);
        }

    }
    class PublicClculate
    {
        public static void PublicClculatetest(Calculate calculate)
        {

            calculate.DisplayResult();
        }
    }
}
